<%@ page language="java" pageEncoding="UTF-8" %>
<%@ include file="/common/taglibs.jsp"%>
<%@ taglib uri="http://www.opensymphony.com/oscache" prefix="cache" %>

 <div class="sf-topMenu">
	<!-- When user does not login successfully, this DIV is not display-->	
	
	<s:if test="#session.SPRING_SECURITY_CONTEXT!=null">
		<%
			String userName = org.springframework.security.core.context.SecurityContextHolder.getContext().getAuthentication().getName();
			String menuCacheKey = "menu_" +userName+"_"+ session.getAttribute("roleCode") + "_" + request.getAttribute("com.opensymphony.xwork2.ActionContext.locale");
		%>
		
		<cache:cache key="<%=menuCacheKey%>" groups="menu" >
			<s:action namespace="/home" name="home!menuBar" var="menuAction" flush="false"/>
			<s:property value="#menuAction.menu" escapeHtml="false"/>	
		</cache:cache>
	</s:if>
		
 </div>
 